package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 商品表 sys_post
 *
 * @author ruoyi
 */
public class Goods extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品序号 */
    @Excel(name = "商品序号", cellType = ColumnType.NUMERIC)
    private Long goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品编码 */
    @Excel(name = "商品编码")
    private String goodsCode;

    /** 商品金额 */
    private BigDecimal goodsPrice;

    /** 商品类型 */
    private int goodsType;


    /** 商品商户id */
    private String goodsMerchantId;


    /** 商品商户编码 */
    private String goodsMerchantCode;


    /** 商户商品金额 */
    private BigDecimal goodsMerchantPrice;

    /** 手续费 */
    private BigDecimal serviceCharge;

    /** 备注 */
    private String remark;

    /** 商品排序 */
    @Excel(name = "商品排序")
    private String sort;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 用户是否存在此商品标识 默认不存在 */
    private boolean flag = false;


    public Long getGoodsId() {
        return this.goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsCode() {
        return this.goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodsName() {
        return this.goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getSort() {
        return this.sort;
    }

    public void setSort(String goodsSort) {
        this.sort = sort;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public boolean isFlag()
    {
        return flag;
    }

    public void setFlag(boolean flag)
    {
        this.flag = flag;
    }

    public BigDecimal getGoodsPrice() {
        return this.goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public int getGoodsType() {
        return this.goodsType;
    }

    public void setGoodsType(int goodsType) {
        this.goodsType = goodsType;
    }

    public String getGoodsMerchantId() {
        return this.goodsMerchantId;
    }

    public void setGoodsMerchantId(String goodsMerchantId) {
        this.goodsMerchantId = goodsMerchantId;
    }

    public String getGoodsMerchantCode() {
        return this.goodsMerchantCode;
    }

    public void setGoodsMerchantCode(String goodsMerchantCode) {
        this.goodsMerchantCode = goodsMerchantCode;
    }

    public BigDecimal getGoodsMerchantPrice() {
        return this.goodsMerchantPrice;
    }

    public void setGoodsMerchantPrice(BigDecimal goodsMerchantPrice) {
        this.goodsMerchantPrice = goodsMerchantPrice;
    }

    public BigDecimal getServiceCharge() {
        return this.serviceCharge;
    }

    public void setServiceCharge(BigDecimal serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    @Override
    public String getRemark() {
        return this.remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    //    @Override
//    public String toString() {
//        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
//            .append("postId", getPostId())
//            .append("postCode", getPostCode())
//            .append("postName", getPostName())
//            .append("postSort", getPostSort())
//            .append("status", getStatus())
//            .append("createBy", getCreateBy())
//            .append("createTime", getCreateTime())
//            .append("updateBy", getUpdateBy())
//            .append("updateTime", getUpdateTime())
//            .append("remark", getRemark())
//            .toString();
//    }


    @Override
    public String toString() {
        return "Goods{" +
                "goodsId=" + goodsId +
                ", goodsCode='" + goodsCode + '\'' +
                ", goodsName='" + goodsName + '\'' +
                ", goodsSort='" + sort + '\'' +
                ", status='" + status + '\'' +
                ", flag=" + flag +
                '}';
    }
}
